/**
 * 
 */
package com.zhbit.actions;

import javax.annotation.Resource;

import com.opensymphony.xwork2.ActionSupport;
import com.zhbit.domain.User;
import com.zhbit.services.UserService;

/**
 * @author Administrator
 * 
 */
public class UserAction extends ActionSupport {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private User user;
	@Resource
	private UserService userSrv;
	private String repassword;

	public String register() {
		User user1;
		user1 = userSrv.insertUser(user);

		if (user1 != null) {
			return this.SUCCESS;
		} else {
			return this.INPUT;
		}
	}

	public String login() {
		return this.SUCCESS;
	}

	public String saveUser() {
		return this.SUCCESS;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public UserService getUserService() {
		return userSrv;
	}

	public void setUserService(UserService userService) {
		this.userSrv = userService;
	}

	public void setRepassword(String repassword) {
		this.repassword = repassword;
	}

	public String getRepassword() {
		return repassword;
	}
}
